package routerFactory

import (
	"github.com/gin-gonic/gin"
	"github.com/go-test/controllers"
	"log"
)

func Router(router *gin.Engine) {
	log.Println("start init system router");
	router.Static("/static", "./static")
	user := router.Group("/user")
	{
		user.GET("/:id", controllers.GetUser)
		user.POST("/", controllers.SaveUser)
		user.PUT("/", controllers.UpdateUser)
		user.DELETE("/:id", controllers.DeleteUser)
	}

	page := router.Group("/testing")
	{
		page.GET("/testing", controllers.StartPage)
	}

}
